<?php

class Domain_Default {

    public function getExpressInfo( $order ) {

        $model = new Model_Default();
        $info = $model->getExpressInfo($order);
        if( is_array($info)){
            if( $info['status'] == 200 ){
                $res['order'] = $info['nu'];
                $res['isCheck'] = $info['ischeck'];
                $res['companyName'] = $info['companyCode'];
                $res['details'] = $info['data'];
                $res['thanks'] = 'http://www.kuaidi100.com/';
                return $res;
            }else{
                return $info;
            }
        }else{
            return ['status'=>$info];
        }
    }

    public function getBarCodeInfo( $ean ) {
        $model = new Model_Default();
        $info = $model->getBarCodeInfo($ean);
        $info['Thanks'] = "http://www.topscan.com/";
        return $info;
    }

}